package com.yaocw.baseproject.activity;

import android.os.Handler;
import android.os.Looper;

import com.yaocw.baseproject.R;

public class SplashActivity extends BaseActivity {

    @Override
    protected int initLayout() {
        return R.layout.activity_splash;
    }

    @Override
    protected void initView() {
        new Handler(Looper.myLooper()).postDelayed(new Runnable() {
            @Override
            public void run() {
                String isFirst = getSpVal("is_first");
                if (isFirst == null || isFirst.equals("")) {
                    saveSpVal("is_first", "No");
                    navigateTo(GuideActivity.class);
                    finish();
                } else {
//                    navigateTo(LoginActivity.class);
                    navigateTo(MainActivity.class);
                    finish();
                }
            }
        }, 666);
    }

    @Override
    protected void initData() {

    }
}